package my.mall.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * <p>
 * 
 * </p>
 *
 * @author fengbo
 * @since 2024-05-11
 */
@TableName("mall_dictionary")
class Dictionary {

    @TableId(value = "id", type = IdType.AUTO)
    var id: Int? = null

    /**
     * 字典键
     */
    var dictKey: String? = null

    /**
     * 字典值
     */
    var dictValue: String? = null

    /**
     * 父节点ID
     */
    var parentId: Int? = null

    /**
     * 字典顺序
     */
    var dictOrder: Int? = null

    /**
     * 删除标记
     */
    var deletedFlag: Byte? = null

    companion object {

        const val ID : String = "id"


        const val DICT_KEY : String = "dict_key"


        const val DICT_VALUE : String = "dict_value"


        const val PARENT_ID : String = "parent_id"


        const val DICT_ORDER : String = "dict_order"


        const val DELETED_FLAG : String = "deleted_flag"

    }

    override fun toString(): String {
        return "Dictionary{" +
        "id=" + id +
        ", dictKey=" + dictKey +
        ", dictValue=" + dictValue +
        ", parentId=" + parentId +
        ", dictOrder=" + dictOrder +
        ", deletedFlag=" + deletedFlag +
        "}"
    }
}
